package com.qlshouyu.len45.configuration;

import com.qlshouyu.len45.models.Address;
import com.qlshouyu.len45.models.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * TODO
 *
 * @author 高露 邮箱：<a href="egojit@qq.com">egojit@qq.com</a>
 * @since 2019-11-03 21:02
 */
@Configuration
//@AutoConfigureBefore(AddressAutoConfiguration.class)
//@AutoConfigureAfter(AddressAutoConfiguration.class)
public class MyAutoConfiguration {

    @Bean
    public User user(Address address){
        User user=new User();
        user.setName("gaolu");
        user.setAddress(address);
        return user;
    }


}
